    <div id="application">
        <% if !session[:user]%>
            <%= link_to "注册", :controller=>"users", :action=>"register"%>
        <% else %>
            <span><%= session[:user].name%></span>
            <%= link_to "退出登录", :controller=>"users", :action=>"logout"%>
        <% end %>
        
        | <a href="/main/local">快捷导入工具</a>
        | <a href="http://www.5789.com" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage(this.href);return(false);" style="behavior: url(#default#homepage)"><img src="/images/home.gif"> 设为主页</a>
    </div>
    <div id="top">
        <div id="bar">
        <a id="logo" href="http://www.5789.com"><img src="/images/5789logo.gif"></a>
        <!--
        <img id="banner" src="/images/5789bar.gif"/>
        -->
        <iframe id="baiduSpFrame" border="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" framespacing="0" frameborder="0" scrolling="no" width="640" height="60" src="http://spcode.baidu.com/spcode/spstyle/style1636.jsp?tn=jingfang33_sp&ctn=0&styleid=1636"></iframe>
        </div>
        
        <% if session[:user]%>
            <% if controller.action_name == "index"%>
                <input type="submit" value="" class="folder_button" onclick="document.location='/main/myurl';" onmousemove="this.className='folder_button_active';" onmouseout="this.className='folder_button';"></input>
            <% else %>
                <input type="submit" value="" class="main_button" onclick="document.location='/main/index';" onmousemove="this.className='main_button_active';" onmouseout="this.className='main_button';"></input>
            <% end %>
        <% else %>
            <input type="submit" value="" class="login_button" onclick="document.location='/main/login';" onmousemove="this.className='login_button_active';" onmouseout="this.className='login_button';"></input>
        <% end %>
    </div>
    